{% extends 'myhome/base.html' %}

    {% block title %}
    <title>BookShop-登陆</title>
    {% endblock %}

    {% block con %}
    <!-- breadcrumbs-area-start -->
    <div class="breadcrumbs-area mb-70">
        <div class="container">
            <div class="row">
                <div class="col-lg-12">
                    <div class="breadcrumbs-menu">
                        <ul>
                            <li><a href="{% url 'myhome_index' %}">首页</a></li>
                            <li><a href="#" class="active">登陆</a></li>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!-- breadcrumbs-area-end -->
    <!-- user-login-area-start -->
    <div class="user-login-area mb-70">
        <div class="container">
            <div class="row">
                <div class="col-lg-12">
                    <div class="login-title text-center mb-30">
                        <h2>登陆</h2>
                    </div>
                </div>
                <div class="col-lg-offset-4 col-lg-4 col-md-offset-3 col-md-6 col-sm-12 col-xs-12">
                    <form action="{% url 'myhome_login' %}?nextpath={{ request.GET.nextpath }}" method="POST">
                        {% csrf_token %}
                        <div class="login-form">
                            <div class="single-login">
                                <label>手机号<span>*</span></label>
                                <input type="text" name="phone" required/>
                            </div>
                            <div class="single-login">
                                <label>密码<span>*</span></label>
                                <input type="password" name="password" required/>
                            </div>
                            <div class="single-login single-login-2 col-md-offset-4">
                                <a href="javascript:void(0);" id="login">
                                    登陆
                                </a>
                            </div>
                            <div class="single-login single-login-2 col-md-offset-4">
                                <a href="{% url 'myhome_register' %}">注册</a>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
    <!-- user-login-area-end -->
    {% endblock %}

    {% block myjs %}
    <script>
        // 给登陆的a标签绑定单击事件
        $('#login').click(function(){
            // 找到对应的表单，触发表单事件
            $(this).parents('form').submit()
        })
    </script>
    {% endblock %}










